<?php

require("top.php");
$users = User::getRangeOfUsers(0, 10000);
$select = array();
foreach($users as $user) {
    if($user['credit_parrainage'] > 0 && $user['lastPurchase'] < "2009-10-01") {
        $select[] = $user;
    }
}
$select = array(new User(329));
foreach($select as $user) {
    $cart = new Cart();
    $min = $cart->getMinAmount($user['credit_parrainage']);
    $mail = new Mail();
    $mail->setTo($user['email']);
    $mail->setSubject($user['prenom'].", profitez de votre cagnotte sur e-Citizen avant son expiration !");
    $mail->setFrom("client@e-citizen.com");
    $mail->setContent("relance_parrainage2", array('user'=>$user, 'min'=>$min));
    $mail->send();
break;
   
}

?>